package cc.yugu.yhdw.common.protocol.msg03;

import cc.yugu.yhdw.common.protocol.MsgCode;
import io.netty.buffer.ByteBuf;

public class Msg031000012 extends Msg031 {
    public int fullVolume;
    public int price;
    public String qrcode;
    public byte socFullVolume;
    public byte chargeNum;


    @Override
    public int getMsgCode() {
        return MsgCode.MSG_031000012.getCode();
    }

    @Override
    public void readData(ByteBuf buffer) {
        fullVolume = buffer.readInt();
        price = buffer.readInt();
        qrcode = readString(buffer);
        socFullVolume = buffer.readByte();
        chargeNum = buffer.readByte();

    }

    @Override
    public void writeData(ByteBuf buffer) {
        buffer.writeInt(fullVolume);
        buffer.writeInt(price);
        writeString(buffer, qrcode);
        buffer.writeByte(socFullVolume);
        buffer.writeByte(chargeNum);
    }
}
